package guoanmaker.operator.business.controller;

import java.io.IOException;
import java.io.OutputStream;

import javax.servlet.http.HttpServletResponse;

import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import guoanmaker.operator.business.model.OperatorLuckdrawRecord;
import guoanmaker.operator.business.service.OperatorLuckdrawRecordServiceInterface;
import guoanmaker.operator.helper.common.AjaxJson;
import guoanmaker.operator.helper.common.abstractobj.ApiController;
/**
 *  
 *
 * @ClassName: OperatorLuckdrawRecordController
 * @author: wanghongwei
 * @date 2017/8/15 下午17:50
 */
import io.swagger.annotations.ApiOperation;
@RestController
@RequestMapping(ApiController.OPERATOR_LUCKDRAW_RECORD)
public class OperatorLuckdrawRecordController {
	private final AjaxJson ajaxJson;
	private final  OperatorLuckdrawRecordServiceInterface operatorLuckdrawRecordServiceInterface;
	public OperatorLuckdrawRecordController(AjaxJson ajaxJson,OperatorLuckdrawRecordServiceInterface operatorLuckdrawRecordServiceInterface){
		this.ajaxJson=ajaxJson;
		this.operatorLuckdrawRecordServiceInterface=operatorLuckdrawRecordServiceInterface;
	}
	/** 
	  * @Title: getOperatorLuckdraw
	  * @Description:通过活动id/用户id,通过活动id/最大时间，最小时间  查询中奖记录
	  * @param: OperatorLuckdrawController   
	  * @return AjaxJson    
	  * @throws 
	  */
	 @ApiOperation(value = "通过活动id查询中奖记录", notes = "查询中奖记录")
	 @PostMapping(value = "getOperatorLuckdrawRecord")
	 public AjaxJson getOperatorLuckdrawRecord(@RequestParam String id){
		 return ajaxJson.setSuccess(true).setStatus(200).setData(operatorLuckdrawRecordServiceInterface.getOperatorLuckdrawRecord(id));
	 }
	 
}
